package no.sogl.web;

import java.util.Collection;
import java.util.Collections;

import no.sogl.domain.Person;
import no.sogl.domain.PersonTag;
import no.sogl.domain.TeamCoach;
import no.sogl.domain.TeamContact;
import no.sogl.domain.TeamMember;

import org.springframework.roo.addon.web.mvc.controller.scaffold.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@RooWebScaffold(path = "people", formBackingObject = Person.class)
@RequestMapping("/people")
@Controller
public class PersonController {
	@ModelAttribute("persontags")
	@SuppressWarnings("unchecked")
    public Collection<PersonTag> populatePersonTags() {
        return Collections.EMPTY_SET;
    }
    
    @ModelAttribute("teamcoaches")
    @SuppressWarnings("unchecked")
    public Collection<TeamCoach> populateTeamCoaches() {
    	return Collections.EMPTY_SET;
    }
    
    @ModelAttribute("teamcontacts")
    @SuppressWarnings("unchecked")
    public Collection<TeamContact> populateTeamContacts() {
    	return Collections.EMPTY_SET;
    }
    
    @ModelAttribute("teammembers")
    public Collection<TeamMember> populateTeamMembers() {
        return TeamMember.findAllTeamMembers();
    }
}
